from info import create_app, db, models
from flask_migrate import Migrate, MigrateCommand
from flask_script import Manager


app = create_app("develop")

# 創建Manager對象，管理app
manager = Manager(app)

# 使用Migrate將app和db 關聯起來
Migrate(app,db)

# 添加操作命令使用，MigrateCommand
manager.add_command("db", MigrateCommand)


if __name__ == "__main__":
    # app.run()
    manager.run()